#include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10;
const int mod=998244353;

long long quickpow(long long a,long long n)
{
	long long re=1;
	while(n!=0)
	{
		if(n%2==1)
		{
			re=re*a;
		}
		a=a*a;
		n=n/2;
	}
	return re;
}

int main()
{
	ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    
    int a;
    cin >> a;
    int n;
    cin >> n;
    cout << quickpow(a,n) << endl;
    return 0;
}
